#include "head.h"


int main(){
    // read config
    char ip[60];
    if(getparameter("ip",ip) != 0){
        // error handling
        error(1,0,"config file");
    }
    char port[60];
    if(getparameter("port",port) !=0){
        error(1,0,"config file");
    }
    int socket_fd;
    char *ip2 = "192.168.85.129";
    char *port2 = "8080";
    if(init_socket(&socket_fd,ip2,port2) != 0){
        printf("The serve is busy\n");
        exit(1);
    }

    char command[60];
    printf("PLEASE SELECT Y OR R OR E\n");
    read(0, command, sizeof(char));
    analyse(command,socket_fd);
    printf("sssss");
    while(1){
        printf("");
        memset(command,0, sizeof(command));
    }

    return 0;

}
